﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Public;


namespace DAL
{
    public class KhaiTuDAL
    {
        
        public static void insertChungTu(KhaiTuPublic _ct)
        {
            GiayChungTu gct = new GiayChungTu();
            gct.LyDoChet = _ct.LyDoChet;
            gct.MaCT = _ct.MaCT;
            gct.NgayCap = _ct.NgayCap;
            gct.NoiChet = _ct.NoiChet;
            gct.NgayChet = _ct.NgayChet;
            gct.SoChungTu = _ct.SoChungTu;
            gct.NoiCap = _ct.NoiCap;
            gct.NguoiCap = _ct.NguoiCap;
            gct.ChucVu = _ct.ChucVu;
            gct.NguoiDangKi = _ct.NguoiDangKi;
            gct.SoBaoTu = _ct.SoBaoTu;
            
            gct.NoiOCuoiCung = _ct.NoiOCuoiCung;
            Common.db.AddToGiayChungTus(gct);
            Common.db.SaveChanges();
        }
    }
}
